-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SOK-29] Start End State #22
Conversation
- Передал стайте нажатия клавиш в компонент страницы - Обработал клики по клавишам в интерфейсе для управлением игрой
…to SOK-29_game-start-end-state
…to SOK-29_game-start-end-state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Отличная работа! Выглядит круто! Замечаний нет, только предложение по улучшению.
tagName="span" | ||
/> | ||
|
||
<PauseHelp | ||
className="game-controll__pause-help-buttons" | ||
pauseIcon={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лучше вынести в отдельную функцию, чтобы не усложнять логику внутри JSX
например так:
const getPauseIcon = () => {
if (gameState.isGamePaused && gameState.isGameStarted && !gameState.isGameOver && !gameState.isGameWinning) {
return <Icon id="arrow-right" width={12} height={16} />;
}
return <Icon id="pause-icon" width={16} height={17} />;
};
<PauseHelp
className="game-controll__pause-help-buttons"
pauseIcon={getPauseIcon()}
/>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Готово
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Отличное решение!
…r233/falcon-tanks into SOK-29_game-start-end-state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Отличная работа! Хорошая реализация начала игры, вопросов к этой части нет
…to SOK-29_game-start-end-state
…to SOK-29_game-start-end-state
### Какую задачу решаем
Скриншоты/видяшка (если есть)
TBD (если есть)
Экран победы отверстал, когда в игре можно будет победить, нужно будет его вывести.